package com.zhangmeng.online.exam.entity;

import com.zhangmeng.online.exam.entity.baseEntity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @Description: 选项
 * @author zm
 * @date 2025/2/28 16:10
 * @version: 1.0
 */
@NoArgsConstructor
@Data
@AllArgsConstructor
@Entity
@EqualsAndHashCode(callSuper = false)
@Table(name = "question_option")
public class QuestionOption extends BaseEntity<Long> {

    @ManyToOne(fetch = FetchType.LAZY)
    private Question question;

    private String optionName;//选项A

    private String optionContent;//选项内容

    private Integer optionScore;//选项得分

    private Integer optionOrder;//选项顺序

    private Boolean isAnswer;//是否是正确答案

    private String explanation;//选项解析

}
